package streamforce.crypto.cloud.subscriber;
import java.io.ObjectOutputStream;
import java.util.concurrent.ThreadPoolExecutor;

import streamforce.crypto.event.UserInitAggEvent;
import streamforce.crypto.event.UserInitEvent; 

public class UserInitSubscriber {
	private ObjectOutputStream oos; 
	private ThreadPoolExecutor executor; 
	
	public UserInitSubscriber(ObjectOutputStream oos,
			ThreadPoolExecutor executor) {
		super();
		this.oos = oos;
		this.executor = executor;
	}

	public void update(UserInitEvent event){
		this.executor.execute(new UserEventThread(this.oos, event));
	}
	
	public void update(UserInitAggEvent event){
		this.executor.execute(new UserEventThread(this.oos, event));
	}
}


